
#include <stdio.h>

#include "engine.h"
#include "introstate.h"

CIntroState CIntroState::m_IntroState;

void CIntroState::Init()
{

	printf("CIntroState Init\n");
}

void CIntroState::Cleanup()
{

	printf("CIntroState Cleanup\n");
}

void CIntroState::Pause()
{
	printf("CIntroState Pause\n");
}

void CIntroState::Resume()
{
	printf("CIntroState Resume\n");
}

void CIntroState::HandleEvents(CEngine* engine)
{
	// Process events
	sf::Event Event;
	while(engine->window.GetEvent(Event)) {
		// Close window : exit
		if (Event.Type == sf::Event::Closed)
			engine->Quit();

		// A key has been pressed
		if(Event.Type == sf::Event::KeyPressed) {
			// Escape key : exit
			if(Event.Key.Code == sf::Key::Escape)
				engine->Quit();

			// F1 key : capture a screenshot
			if (Event.Key.Code == sf::Key::F12) {
				sf::Image Screen = engine->window.Capture();
				Screen.SaveToFile("screenshot.jpg");
			}
		}
	}
}

void CIntroState::Update(CEngine* engine) 
{

}

void CIntroState::Draw(CEngine* engine) 
{

}
